home *** CD-ROM | disk | FTP | other *** search
- Path: scsing.switch.ch!vyzynz!xmission!news
- From: tknarr@xmission.com ( Todd Knarr )
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Date: 12 Jan 1996 01:27:30 GMT
- Organization: Chaos Central
- Message-ID: <4d4de2$qmr@news.xmission.com>
- References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd <4cf8hf$8fe@hopi.gate.net> <4cgq30$c0v@weck.brokersys.com> <4cvu68$2jb@macaw.cyberport.com> <4d21og$iab@news.xmission.com> <4d2ok0$69s@beach.and.nl>
- Reply-To: tknarr@xmission.com ( Todd Knarr )
- NNTP-Posting-Host: slc5.xmission.com
- X-Newsreader: IBM NewsReader/2 v1.2
-
- In <4d2ok0$69s@beach.and.nl>, jos@and.nl (Jos A. Horsmeier) writes:
- >IMHO all HN tries to add to the language, is a (weak) notion of domains
- >of objects. I thought (but correct me if I'm wrong) that HN adds a name
- >prefix to an object name for the 'deeper notion' (read: the semantics or
- >domain); it does not prefix every object name with a short prefix
- >indicating the type used to implement the domain of an object.
-
- The idea of a domain ( I usually refer to it as a high-level type )
- is one way to make HN useful. It still doesn't work, though, because
- of inheritance in OO languages and the idea of pointers or references
- to base classes. You wind up with confusion when the reference parameter
- has an HN prefix for base class A but the object is actually of class
- M which is derived from class E which is derived from class A.
-
- Your idea of domains might be useful, but it requires first disabling
- all automatic type conversion between domain types even when such
- conversion is defined. The effects of that might be non-trivial, and
- go against the principle in C and C++ of "you asked for it, you got it".
- Since the effects can be simulated at need, at least if you start with
- a real class and not a built-in type, by using trivial derived classes
- and declaring certain constructors and conversion functions private,
- I'm not certain introducing your domain concept would be useful enough
- to offset it's disagreement with language principles.
-
- --
- Todd Knarr : tknarr@xmission.com | finger for PGP public key
- | Member, USENET Cabal
-
- Seriously, I don't want to die just yet. I don't care how
- good-looking they are, I! don't! want! to! die!"
- -- Megazone ( UF1 )
-
-